package com.gitee.zeric.codec.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gitee.zeric.codec.controller.R;
import com.gitee.zeric.codec.entity.SysCodeRuleGenerate;
import com.gitee.zeric.codec.generaters.RuleParam;

import java.util.List;

/**
 * 系统编码生成规则模块
 *
 * @author zhangjian
 * @date 2021-12-07 14:44:01
 */
public interface SysCodeRuleGenerateService extends IService<SysCodeRuleGenerate> {

    /**
     * 生成规则code
     * @param sysCodeRuleGenerate
     * @return
     */
    String functionForeseeTest(SysCodeRuleGenerate sysCodeRuleGenerate, RuleParam param);


    R saveWithRedis(SysCodeRuleGenerate sysCodeRuleGenerate);

    R updateWithRedisById(SysCodeRuleGenerate sysCodeRuleGenerate);

    R removeWithRedisById(Integer id);

    List<String> batchGet(String ruleCode, int size);

    List<String> functionTestBatch(String ruleCode, int size);
}
